<?php

namespace App\Services\Base;
use App\Models\Base\ApiLog;
use App\Services\BaseService;

/**
 * 接口日志相关业务类
 *
 * @author WangBin
 * @date 2021-09-24
 * @package App\Http\Services
 */
class ApiLogService extends BaseService
{
    /**
     * 保存日志
     *
     * @param array $data
     * @return
     */
    public function save(array $data)
    {
        $apiLog = new ApiLog();
        foreach ($data as $field => $val)
        {
            $apiLog->{$field} = $val;
        }
        $apiLog->save();
    }
}
